cat('Creating Table A25 \n\n')

dat = read.csv('TableA25_data.csv')
non.south.dat = dat[dat$region != 'South',]

reg1 = lm(romney.vote~hisp.pct.change+male+income.recode+age,
          data = dat)
clustered.se = cl(dat, reg1, dat$COUNTY)
reg1$se = clustered.se

reg2 = lm(romney.vote~hisp.pct.change+male+income.recode+age+state,
          data = dat)
clustered.se = cl(dat, reg2, dat$COUNTY)
reg2$se = clustered.se

reg3 = lm(romney.vote~hisp.pct.change+male+income.recode+age,
          data = non.south.dat)
clustered.se = cl(non.south.dat, reg3, non.south.dat$COUNTY)
reg3$se = clustered.se

reg4 = lm(romney.vote~hisp.pct.change+male+income.recode+age+state,
          data = non.south.dat)
clustered.se = cl(non.south.dat.dat, reg4, non.south.dat$COUNTY)
reg4$se = clustered.se

outtable = apsrtable(reg1,
                     reg2,
                     reg3,
                     reg4,
                     Sweave = T,
                     notes = '',
                     stars = 'default'
)
writeLines(
  outtable, 'TableA25.tex')



